home *** CD-ROM | disk | FTP | other *** search
/ Trading on the Edge / Trading On The Edge - CD-ROM Toolkit (Wayzata Technology)(2031)(1994).bin / pc / mac_file / vendor_d / neuralwa / nw2v50 / art1.nnc < prev    next >
Text File  |  1993-08-23  |  4KB  |  125 lines

  1. csv3.1        !file format is Control Strategy Version 3.1
  2. ! Aug 88  (art1.nnc)  ART 1 Network
  3. !************************************************************************
  4. !*                                    *
  5. !*    ART 1 Network Control Strategy                    *
  6. !*                                    *
  7. !*                                    *
  8. !*    This control strategy assumes the following layers:        *
  9. !*                                    *
  10. !*    layer 0:    Input Buffer                    *
  11. !*                                    *
  12. !*    layer 1:    Input Size Layer (1 PE )            *
  13. !*    layer 2:    Input Active Layer ( 1 PE )            *
  14. !*    layer 3:    F2 Active Layer ( 1 PE )            *
  15. !*    layer 4:    Gain Control Layer ( 1 PE )            *
  16. !*    layer 5:    ART F1 Layer                    *
  17. !*                                    *
  18. !*    layer 6:    F1 size layer ( 1 PE )                *
  19. !*    layer 7:    Vigilance Layer ( 1 PE )            *
  20. !*    layer 8:    Reset Layer ( 1 PE )                *
  21. !*    layer 9:    ART F2 Layer                    *
  22. !*                                    *
  23. !*    In the ART 1 Network diagram the layers must be positioned    *
  24. !*    geometrically in this order from bottom to top of the screen.    *
  25. !*                                    *
  26. !************************************************************************
  27. !
  28. !MASK     label    op-code    operands    comment
  29. L_saR_sa    trace    aux3        !  0 set trace option to aux3
  30. L_saRi_a    cset    recall,1    !  1 Initialize recall count
  31. L_saR_sa     cset    wrk2,0        !  2 work counter
  32. !
  33. ! Zero out layers
  34. !
  35. L_saRi_a    lset    in        !  3 Input Layer
  36. L_saRi_a @init    math    o=0        !  4 Zero out layer
  37. L_saRi_a    lset    cur,1        !  5 next layer
  38. L_saRi_a    lcmp    abs,9        !  6 At F2 layer ?
  39. L_saRi_a    blt    @init        !  7 loop till done
  40. L_saRi_a     math    o=0        !  8 Zero out F2 layer
  41. !
  42. ! Get input
  43. !
  44. L_saRi_a    lset    in        !  9 input layer
  45. L___Ri_a    io    read        ! 10 get input data (recall)
  46. L_saR___    io    lrnin        ! 11 get input data (learn)
  47. !
  48. ! Process Input Layer
  49. !
  50. L___Ri_a     math    sum|rnoise|tran|output ! 12
  51. L_saR___    math    sum|lnoise|tran|output|fire !13
  52. !
  53. ! START OF MAIN RECALL LOOP
  54. !
  55. ! Gain Control - process each of the layers in the attentional subsystem.
  56. !
  57. L_saR_sa @rloop    lset    in,1        ! 14 Start of gain control layers
  58. L_saR_sa @gain    math    sum|tran|output|fire    ! 15 Process layers
  59. L_saR_sa    lset    cur,1        ! 16 next layer
  60. L_saR_sa    lcmp    abs,5        ! 17 At F1 layer ?
  61. L_saR_sa    blt    @gain        ! 18 loop till done
  62. !
  63. ! F1 Activity
  64. !
  65. L_saR_sa    math    sum|tran|output|fire    ! 19 Top Down filter
  66. L_saR_sa    io    wrstep        ! 20 Show activity to userio
  67. L_saR_sa    fcmp    lflag,36    ! 21 check for user abort
  68. L_saR_sa    banz    @end        ! 22 break out of loop
  69. !
  70. ! Alternate between bottom up filter and reset calculations
  71. !
  72. L_saR_sa    ccmp    wrk2,0        ! 23 Filter or reset ?
  73. L_saR_sa    bne    @reset        ! 24 do reset calculations
  74. !
  75. ! F2 Activity: skip F2 filter except for first time through to
  76. ! improve speed; values are stored in tran anyway.
  77. !
  78. L_saR_sa     cset    wrk2,1        ! 25 next time do reset
  79. L_saR_sa     lset    abs,9        ! 26 F2 layer
  80. L_saR_sa    ccmp    recall,1    ! 27 First time through ?
  81. L_saR_sa    bne    @skipf        ! 28 Skip filter
  82. L_saR_sa    math    sum|tran|fire    ! 29 F2 filter
  83. L_saR_sa @skipf    math    output|e=w|fire    ! 30 Competitive output
  84. L_saR_sa    br    @rloop        ! 31 continue
  85. !
  86. ! Calculate Reset - process each of the layers in the orienting subsystem
  87. !
  88. L_saR_sa @reset cset    wrk2,0        ! 32 next time do filter
  89. L_saR_sa     lset    abs,6        ! 33 Start of reset layers
  90. L_saR_sa @rstlp    math    sum|tran|output|fire    ! 34 Process layers
  91. L_saR_sa    lset    cur,1        ! 35 next layer
  92. L_saR_sa    lcmp    abs,9        ! 36 At F2 layer ?
  93. L_saR_sa    blt    @rstlp        ! 37 loop till done
  94. !
  95. !
  96. ! Propagate reset wave
  97. !
  98. L_saR_sa    lset    abs,9        ! 38 F2 layer
  99. L_saR_sa    math    set|reset|fire    ! 39 reset PEs
  100. L_saR_sa     cadd    recall,1    ! 40 increment recall counter
  101. !
  102. ! Determine if pattern match has been found. If so, go and update LTM,
  103. ! if not, continue recall.
  104. !
  105. L_saR_sa     cset    wrk1,0        ! 41 Initialize wrk1
  106. L_saR_sa    math    e-=w|cterr|fire    ! 42 pre/post resonance error
  107. L_saR_sa    ccmp    wrk1,0        ! 43 = 0 ?
  108. L_saR_sa    beq    @learn        ! 44 steady state, update LTM
  109. L_s_R_s_    eos            ! 45 End of a recall step
  110. L_saR_sa      br    @rloop        ! 46 continue update
  111. !
  112. ! Update Long Term Memory
  113. L_saR___ @learn    lset    abs,5        ! 47 F1 layer
  114. L_saR___    cset    wrk1,0        ! 48 Initialize wrk1
  115. L_saR___    math    e=o|cterr|learn|fire ! 49 Store |X| in wrk1, top-down LTM
  116. L_saR___    lset    abs,9        ! 50 F2 layer
  117. L_saR___    math    learn|fire    ! 51 Update bottom up LTM
  118. !
  119. ! Show output to userio
  120. !
  121. L_saR_sa @end     lset    abs,9        ! 52 F2 layer
  122. L___R_sa    io    write        ! 53 Write recall output
  123. L_saR___    io    lrnrslt        ! 54 Write learn output
  124. LisaRisa    trace    0        ! 55 turn off any trace function
  125.